BAR-GRAPH

Creates a side-by-side frequency or probability bar graph of 1- to 4-way data, or stacked bar graph for 2- or 3-way data using the Young-Kwan mosaic algorithm.

There are two input formats: CELL DATA where the data give information about table cells, and VARIABLE DATA, where the data give information about variables. The input format is determined from the nature of the arguments:
CELL DATA     There are at least two arguments. Each is a list.
VARIABLE DATA Otherwise

Arguments for CELL INPUT:
REQUIRED:     CELLS   list of cells in way-major order. 
              LEVELS  list giving the number of levels for each way. 
KEYWORDS:     See below

Arguments for VARIABLE INPUT:
OPTIONAL:     DATA    identifies the data (see below).
KEYWORDS:     See below

The optional data argument may be omitted (in which case it defaults to $), or may a data object, a list of numeric or string elements, a list of variable objects, a list of lists, a vector, a list of vectors, or a matrix. No matter what the nature of DATA, it is converted into a list of equal-lengthed vectors. If not specified, DATA is assumed to be $, the current dataobject which is converted into a list of vectors, one vector for each of the OK-VAR-TYPES variables in $, the current-data. The plot is constructed from the first few vectors in the list of vectors, the number of vectors depending on the details of the plot. If you need to use any of the keyword arguments, the data must be specified, and it must be mentioned before the keywords.

Keyword arguments for both types of input:
KEYWORD:     WAY-LABELS, LEVEL-LABELS, FREQ, STACKED, 
             COLOR-VALUES, (STANDARDIZE T), (CONNECT T) 
             IN, (SHOW T), LOCATION, SIZE, TITLE, MENU,  
             LEGEND1, LEGEND2, TOP-MOST, GO-AWAY, CONTENT-ONLY

Keyword arguments which are unique to BARGRAPH:
WAY-LABELS   A list specifying the names of the ways.
LEVEL-LABELS A list of lists, one sublist for each way of the data.
             The lists are in the same order as the way-labels.
             Each sublist specifies the names of the levels of a way.
FREQ         Indicates whether the data are frequency data. 
STACKED      Indicates whether intial plot is stacked (when possible)
             or side-by-side bar graph.
CONNECT      Indicates whether bars are connected by rows.
COLOR-VALUES A list, in way-major order, used to color cells according 
             to the specified values (standardized when STANDARDIZE T).
             By default, ViSta generates the color values.

Keyword arguments shared with other plots:
IN (unused)  T, NIL, (UNUSED) or CONTAINER sets the container window. If a menu item is
             used to create the graphic, IN will be set by the menuing system
             to direct the graph to the appropriate container.
SHOW (T)     T or NIL indicating if the plot is shown when created
TOP-MOST (T) T or NIL sets whether plots are on top
LOCATION     a list (x y) locating the plot's upper-left corner 
SIZE         a list (w h) of the plot's width & height 
MENU         T or NIL to install the graph's menu on the menubar
TITLE        a  string shown in the graph window title bar 
LEGEND1      a string for the first line of the legend 
LEGEND2      a string for the second line of the legend
GO-AWAY (T)  T or NIL sets if the close box is functional 
CONTENT-ONLY T or NIL sets if only graph content is shown.
